<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Option extends Model
{

	/**
     * 不允许赋值的字段
     *
     * @var array
     */
    protected $guarded = [];

	/**
	 * 添加期权
	 * @param  [type] $data
	 * @return [type]       [description]
	 */
    public function storeData($data)
    {
    	$result = $this->create($data);
    	if($result){
    		return true;
    	}else{
    		return false;
    	}
    }


    public function product()
    {
        return $this->belongsTo(Product::class);
    }





}
